package com.cobra.rdd.operator.transform

import org.apache.spark.{SparkConf, SparkContext}

object Spark02_RDD_Operator_Transform_Test {
  def main(args: Array[String]): Unit = {
    val sparkConf = new SparkConf().setMaster("local[*]").setAppName("Operator_Test")
    val sc = new SparkContext(sparkConf)
    //算子获取
    val rdd = sc.textFile("datas/apache.log")
    val dataRDD = rdd.map(line => {
      line.split(" ")(6)
    })
    dataRDD.foreach(println)
    sc.stop()
  }
}
